﻿using System;
using System.Security.Principal;
using Elevation.Common.Services;

namespace Elevation.Runner
{
	class Program
	{
		#region Main

		static void Main()
		{
			Console.WriteLine("I'm {0}, IsAdmin = {1}", GetUsername(), UserService.IsAdmin());
			Console.ReadKey();
		}

		#endregion Main

		#region Helpers

		private static string GetUsername()
		{
			var currentIdentity = WindowsIdentity.GetCurrent();
			return currentIdentity == null ? string.Empty : currentIdentity.Name;
		}

		#endregion Helpers
	}
}
